<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\FictionController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});


Route::group(['prefix'=>'test','namespace'=>'Api'],function(){

	//前台数据展示
	Route::get('/demo',[FictionController::class,'index'])->name('api.demo');
	//详情数据
	Route::get('/find/{id}',[FictionController::class,'find'])->name('api.find');
	

});

